package server.commonData;

import server.business.poker.util.PokerCheck;

/**
 * 牌数据
 * @author King
 *
 */
public class PokerData
{
	/**所拥有的牌**/
	private int[] ownPoker;

	/**牌类型 {@link PokerCheck#XIAOXIAONIU}**/
	private int pokerType = -1;
	
	/**最大牌的值 {@link PokerCheck#getMaxVal}**/
	private int maxPokerVal;
	 
	/**最大牌的颜色 {@link PokerCheck#getMaxValColor(int[])  PokerCheck#COLOR_FANGKUAI}**/
	private int maxPokerColor;
	
	/**选择倍率**/
	private int beilv;

	
	/**计算花色和最大的值**/
	public void calculate()
	{
		this.maxPokerVal = PokerCheck.getMaxVal(ownPoker);
		this.maxPokerColor = PokerCheck.getMaxValColor(ownPoker);
	}
	
	
	public int[] getOwnPoker() {
		return ownPoker;
	}

	public void setOwnPoker(int[] ownPoker) {
		this.ownPoker = ownPoker;
		calculate();
	}

	public int getPokerType() {
		return pokerType;
	}

	public void setPokerType(int pokerType) {
		this.pokerType = pokerType;
	}

	public int getMaxPokerVal() {
		return maxPokerVal;
	}

	public void setMaxPokerVal(int maxPokerVal) {
		this.maxPokerVal = maxPokerVal;
	}

	public int getMaxPokerColor() {
		return maxPokerColor;
	}

	public void setMaxPokerColor(int maxPokerColor) {
		this.maxPokerColor = maxPokerColor;
	}


	public int getBeilv() {
		return beilv;
	}


	public void setBeilv(int beilv) {
		this.beilv = beilv;
	}
	
	
	/**是否选了牌**/
	public boolean isChoose()
	{
		if(this.pokerType==-1)
			return false;
		return true;
	}
	
}
